package practice;

/**
 * Description:
 *
 * @Author cowen
 * @Create 2023/10/19 10:07
 * @Version 1.0
 */
class ArrayRandom{
    public static void main(String[] args) {
        int[] nums = new int[6];
        for (int i = 0; i < nums.length; i++) {
            int num =(int)(Math.random()*(30-1+1))+1;
            for (int j = 0; j < i; j++) {
                if(num==nums[j]){
                    num=(int)(Math.random()*(30-1+1))+1;
                }
            }
        }
        System.out.println("创建成功！");
    }
}
